package com.roncoo.chapter.service.impl;

import com.roncoo.chapter.entity.EduChapter;
import com.roncoo.chapter.dao.EduChapterMapper;
import com.roncoo.chapter.service.EduChapterService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wdf
 * @since 2021-04-07
 */
@Service
public class EduChapterServiceImpl extends ServiceImpl<EduChapterMapper, EduChapter> implements EduChapterService {


    @Resource
    private EduChapterMapper eduChapterMapper;
    /**
     * 根据cid查询所有章和节
     * @param courseId
     * @return
     */
    @Override
    public List<EduChapter> getAll(Integer courseId) {
        List<EduChapter> all=eduChapterMapper.getAll(courseId);
        return all;
    }
}
